package com.hl.toolkit.server.tycoin.account.slaveservice;

import com.tycoin.account.slaveentity.TycoinUserWallet;
import com.tycoin.account.slaverepository.TycoinUserWalletRepository;
import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(value = "slaveTransactionManager", readOnly = true)		
public class TycoinUserWalletService    extends AbstractService<TycoinUserWallet, Long> {

	@Autowired
	private TycoinUserWalletRepository tycoinUserWalletRepository;
	
	@Override
	public AbstractRepository<TycoinUserWallet, Long> getRepository() {
 		return tycoinUserWalletRepository;
	}
	
	
	public List <TycoinUserWallet> getTycoinUserWalletForType(   String userId, String walletType){
		return tycoinUserWalletRepository.getTycoinUserWalletForType(userId, walletType);
	}
	
	public List <TycoinUserWallet> getTycoinUserWalletForUser ( String userId){
		return tycoinUserWalletRepository.getTycoinUserWalletForUser(userId);
		
	}


}
